package service.serviceImpl;

import dao.GradeDao;
import dao.Impl.GradeDaoImpl;
import dao.Impl.ManagerDaoImpl;
import dao.ManagerDao;
import po.Grade;
import service.GradeService;

import java.util.List;

public class GradeServiceImpl implements GradeService {
    private GradeDao dao= new GradeDaoImpl();

    @Override
    public List<Grade> queryAllGrade(Integer cid) {
        List<Grade> grades = dao.queryAll(cid);
        return  grades;
    }

    @Override
    public void delete(Grade grade) {
        dao.delete(grade);

    }

    @Override
    public void insert(Grade grade) {
  dao.insert(grade);
    }

    @Override
    public void update(Grade grade) {
  dao.update(grade);
    }

    @Override
    public Grade queryOne(Integer id) {
        Grade grade = dao.queryOne(id);
        return  grade;
    }
}
